package com.javarevolutions.ws.client;

import java.rmi.RemoteException;

import com.javarevolutions.ws.bean.BeanLogin;
import com.javarevolutions.ws.service.ImpLogin;
import com.javarevolutions.ws.service.ImpLoginProxy;

public class Principal {

	public static void main(String[] args) {
		ImpLogin iface = new ImpLoginProxy(
				"http://localhost:8080/ValidarCredenciales/services/ImpLogin");
		BeanLogin obj = new BeanLogin();
		obj.setUsuario("Srios");
		obj.setPassword("rios");
		try {
			obj = iface.validaLogin(obj);
			if (obj.isStatus()) {
				System.out.print("Welcome . . . ");
			} else {

				System.out.print(obj.getMensaje() + " . . . ");
			}
		} catch (RemoteException re) {
			re.printStackTrace();
		}
	}

}
